<script setup lang="ts">
defineProps<{
  modelValue: number
  car: string
  house: string
}>()

const emits = defineEmits<{
  (e: 'update:modelValue', money: number): void
  (e: 'update:car', car: string): void
  (e: 'update:house', house: string): void
}>()
</script>

<template>
  <div class="child-page">
    <div>钱包: {{ modelValue }}</div>
    <button @click="emits('update:modelValue', modelValue + 30000)">
      搬砖一个月
    </button>
    <div>座驾: {{ car }}</div>
    <button @click="emits('update:car', '自行车')">换车</button>
    <div>住处: {{ house }}</div>
    <button @click="emits('update:house', '乡村大別野')">换车</button>
  </div>
  <p>---------------------</p>
</template>

<style lang="scss" scoped></style>
